import { S } from '../../s';
import { IPSDEDRBar } from './ipsdedrbar';
import { IPSDEDRBarGroup } from './ipsdedrbar-group';
import { PSDEDRCtrlImpl } from './psdedrctrl-impl';
import { IPSLanguageRes } from '../../res/ipslanguage-res';

export class PSDEDRBarImpl extends PSDEDRCtrlImpl implements IPSDEDRBar {
  protected psdedrbargroups: IPSDEDRBarGroup[];
  getPSDEDRBarGroups(): IPSDEDRBarGroup[] | null {
    return (
      this.psdedrbargroups ||
      (this.psdedrbargroups = this.fillChildListModel(
        this.M.getPSDEDRBarGroups,
        S._9f,
      ) as IPSDEDRBarGroup[])
    );
  }

  findPSDEDRBarGroup(objKey: any): IPSDEDRBarGroup | null {
    return this.getPSModel5(
      S._9f,
      this.getPSDEDRBarGroups(),
      objKey,
    ) as IPSDEDRBarGroup;
  }

  get title(): string {
    return this.M.title;
  }

  protected titlepslanguageres: IPSLanguageRes;
  getTitlePSLanguageRes(): IPSLanguageRes | null {
    return (
      this.titlepslanguageres ||
      (this.titlepslanguageres = this.fillObjectModel(
        S._276,
        this.M.getTitlePSLanguageRes,
        S._2b1,
      ) as IPSLanguageRes)
    );
  }

  get showTitle(): boolean {
    return this.M.showTitle;
  }
  get cls(): string {
    return 'PSDEDRBarImpl';
  }
  instanceof(cls: string): boolean {
    if (cls == S._1f || cls == S._21e || cls == S._21f) return true;
    return super.instanceof(cls);
  }
}
